package pro.shushi.pamirs.hr.api.enums.eam;

import pro.shushi.pamirs.meta.annotation.Errors;
import pro.shushi.pamirs.meta.common.enmu.ExpBaseEnum;
import pro.shushi.pamirs.meta.common.enmu.IEnum;

/**
 * EAM管理据模块错误枚举
 */
@Errors(displayName = "HR示例工程EAM错误枚举")
public enum EamExpEnum implements ExpBaseEnum, IEnum<Integer> {

    MTOOLMD_NOT_EXISTS(ERROR_TYPE.BIZ_ERROR, 2025001, "工装型号：{}在组织编码：{}中未定义。"),
    PJ_TYPE_ERROR(ERROR_TYPE.BIZ_ERROR, 2025002, "工装型号编码：{}的特殊分类为：{}，保养项目不允许包含：{}。"),
    MUST_GREATER_ERROR(ERROR_TYPE.BIZ_ERROR, 2025003, "{} 值不正确，必须大于：{}。"),
    MUST_GE_ERROR(ERROR_TYPE.BIZ_ERROR, 2025004, "{} 值不正确，必须大于等于：{}。"),
    MUST_LESS_ERROR(ERROR_TYPE.BIZ_ERROR, 2025005, "{} 值不正确，必须小于：{}。"),
    MTOOLMD_NOT_VALID(ERROR_TYPE.BIZ_ERROR, 2025006, "工装型号：{}在组织编码：{}中未启用。"),
    EAM_ERROR_00001(ERROR_TYPE.BIZ_ERROR, 2025007, "{} 不允许为空。"),
    EAM_ERROR_00002(ERROR_TYPE.BIZ_ERROR, 2025008, "保养单编码：{}在组织编码：{}中未定义。"),
    EAM_ERROR_00003(ERROR_TYPE.BIZ_ERROR, 2025009, "保养单编码：{}在组织编码：{}中未启用。"),
    EAM_ERROR_00004(ERROR_TYPE.BIZ_ERROR, 2025010, "工装编码：{}在组织编码：{}中未定义。"),
    EAM_ERROR_00005(ERROR_TYPE.BIZ_ERROR, 2025011, "工装编码：{}在组织编码：{}中未启用。"),
    EAM_ERROR_00006(ERROR_TYPE.BIZ_ERROR, 2025012, "工装编码：{}的状态为：{}，不能操作"),
    EAM_ERROR_00007(ERROR_TYPE.BIZ_ERROR, 2025013, "保养项目明细不允许为空。"),
    EAM_ERROR_00008(ERROR_TYPE.BIZ_ERROR, 2025014, "保养结果值不能为：{}，请重新输入。"),
    EAM_ERROR_00009(ERROR_TYPE.BIZ_ERROR, 2025015, "保养项目编码：{}的质量状态为：{}，不能操作。"),
    EAM_ERROR_00010(ERROR_TYPE.BIZ_ERROR, 2025016, "保养项明细的质量状态全部合格或带病作业，保养结果只能为正常。"),
    EAM_ERROR_00011(ERROR_TYPE.BIZ_ERROR, 2025017, "保养结果只能为{}。"),
    ;

    public static final String DICTIONARY = "hr.simple.exceptions";

    private final ERROR_TYPE type;
    private final int code;
    private final String msg;

    EamExpEnum(ERROR_TYPE type, int code, String msg) {
        this.type = type;
        this.code = code;
        this.msg = msg;
    }

    @Override
    public ERROR_TYPE type() {
        return type;
    }

    @Override
    public int code() {
        return code;
    }

    @Override
    public String msg() {
        return msg;
    }
}
